#include "../Include/SplitTool.h"
#include <map>

std::vector<std::string> SplitToolCppJieba::cut(const std::string& sentence) {
    static std::map<std::string, std::string> conf(_conf.getConfigMap());
    static std::string dict_path = conf["DICT_PATH"];
    static std::string hmm_path = conf["HMM_PATH"];
    static std::string user_dict_path = conf["USER_DICT_PATH"];
    static cppjieba::Jieba jieba(dict_path, hmm_path, user_dict_path);
    
    std::vector<std::string> words;
    jieba.Cut(sentence, words, true);
    return words;
}